package com.cdm.persistence;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * File: User.java
 * <P>
 * Description: Persistence Entity User.
 * <P>
 * <B>Change History :</B>
 * <P>
 * <ul>
 * <li>Mar 4, 2008 Created by vivo</li>
 * </ul>
 * 
 * @author GaoBo
 */
@Entity
@Table(schema = "CDM", name = "SEQUENCE", uniqueConstraints = {})
public class Sequence {

	@Id
	@Column(name = "name", unique = true, nullable = false, length = 20)
	private String name;

	@Column(name = "value", unique = false, nullable = false, length = 20)
	private long value;

	@Column(name = "description", unique = false, nullable = true, length = 200)
	protected String description;

	public Sequence() {
	}

	public Sequence(String name, long value, String description) {
		super();
		this.name = name;
		this.value = value;
		this.description = description;
	}

	public Sequence(String name, long value) {
		super();
		this.name = name;
		this.value = value;
	}

	/*
	 * Constants
	 */
	public static final String USER_CP_SEQUENCE = "user_cp_sequence";
	public static final String USER_SP_SEQUENCE = "user_sp_sequence";
	public static final String USER_CDM_SEQUENCE = "user_cdm_sequence";
	public static final String USER_ADMIN_SEQUENCE = "user_admin_sequence";
	public static final String USER_ENDUSER_SEQUENCE = "user_enduser_sequence";

	/*
	 * Getter and Setters
	 */
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public long getValue() {
		return value;
	}

	public void setValue(long value) {
		this.value = value;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
